<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::AutoTuneCriterion Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html">AutoTuneCriterion</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structfaiss_1_1AutoTuneCriterion-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::AutoTuneCriterion Struct Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="AutoTune_8h_source.html">AutoTune.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for faiss::AutoTuneCriterion:</div>
<div class="dyncontent">
 <div class="center">
  <img src="structfaiss_1_1AutoTuneCriterion.png" usemap="#faiss::AutoTuneCriterion_map" alt=""/>
  <map id="faiss::AutoTuneCriterion_map" name="faiss::AutoTuneCriterion_map">
<area href="structfaiss_1_1IntersectionCriterion.html" alt="faiss::IntersectionCriterion" shape="rect" coords="0,56,172,80"/>
<area href="structfaiss_1_1OneRecallAtRCriterion.html" alt="faiss::OneRecallAtRCriterion" shape="rect" coords="182,56,354,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a7873f86515af86a77eaaea1f6b13e982"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7873f86515af86a77eaaea1f6b13e982"></a>
typedef <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">Index::idx_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>idx_t</b></td></tr>
<tr class="separator:a7873f86515af86a77eaaea1f6b13e982"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abd85ee0d09e9f4958330c42e867e432b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abd85ee0d09e9f4958330c42e867e432b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>AutoTuneCriterion</b> (idx_t <a class="el" href="structfaiss_1_1AutoTuneCriterion.html#adcfaafb3f1b3449e2cfd553f0f603a5b">nq</a>, idx_t <a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a3bb11e873707a812999f8391869aafab">nnn</a>)</td></tr>
<tr class="separator:abd85ee0d09e9f4958330c42e867e432b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a174f0de8e6fd01905f5fa2170f5039d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a174f0de8e6fd01905f5fa2170f5039d8">set_groundtruth</a> (int <a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a9b3a2242729a0873d255c1684881bbd4">gt_nnn</a>, const float *gt_D_in, const idx_t *gt_I_in)</td></tr>
<tr class="separator:a174f0de8e6fd01905f5fa2170f5039d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9084449e216b331c5f753a10c6de6a47"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a9084449e216b331c5f753a10c6de6a47">evaluate</a> (const float *D, const idx_t *I) const =0</td></tr>
<tr class="separator:a9084449e216b331c5f753a10c6de6a47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:adcfaafb3f1b3449e2cfd553f0f603a5b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcfaafb3f1b3449e2cfd553f0f603a5b"></a>
idx_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#adcfaafb3f1b3449e2cfd553f0f603a5b">nq</a></td></tr>
<tr class="memdesc:adcfaafb3f1b3449e2cfd553f0f603a5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">nb of queries this criterion is evaluated on <br/></td></tr>
<tr class="separator:adcfaafb3f1b3449e2cfd553f0f603a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bb11e873707a812999f8391869aafab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3bb11e873707a812999f8391869aafab"></a>
idx_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a3bb11e873707a812999f8391869aafab">nnn</a></td></tr>
<tr class="memdesc:a3bb11e873707a812999f8391869aafab"><td class="mdescLeft">&#160;</td><td class="mdescRight">nb of NNs that the query should request <br/></td></tr>
<tr class="separator:a3bb11e873707a812999f8391869aafab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b3a2242729a0873d255c1684881bbd4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9b3a2242729a0873d255c1684881bbd4"></a>
idx_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a9b3a2242729a0873d255c1684881bbd4">gt_nnn</a></td></tr>
<tr class="memdesc:a9b3a2242729a0873d255c1684881bbd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">nb of GT NNs required to evaluate crterion <br/></td></tr>
<tr class="separator:a9b3a2242729a0873d255c1684881bbd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40e91caa9232a597c16fc946d0befd9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a40e91caa9232a597c16fc946d0befd9b"></a>
std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#a40e91caa9232a597c16fc946d0befd9b">gt_D</a></td></tr>
<tr class="memdesc:a40e91caa9232a597c16fc946d0befd9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ground-truth distances (size nq * gt_nnn) <br/></td></tr>
<tr class="separator:a40e91caa9232a597c16fc946d0befd9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af915fc4df215e3c8d9f71ff42d526144"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af915fc4df215e3c8d9f71ff42d526144"></a>
std::vector&lt; idx_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1AutoTuneCriterion.html#af915fc4df215e3c8d9f71ff42d526144">gt_I</a></td></tr>
<tr class="memdesc:af915fc4df215e3c8d9f71ff42d526144"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ground-truth indexes (size nq * gt_nnn) <br/></td></tr>
<tr class="separator:af915fc4df215e3c8d9f71ff42d526144"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Evaluation criterion. Returns a performance measure in [0,1], higher is better. </p>

<p>Definition at line <a class="el" href="AutoTune_8h_source.html#l00026">26</a> of file <a class="el" href="AutoTune_8h_source.html">AutoTune.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9084449e216b331c5f753a10c6de6a47"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double faiss::AutoTuneCriterion::evaluate </td>
          <td>(</td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const idx_t *&#160;</td>
          <td class="paramname"><em>I</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Evaluate the criterion.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">D</td><td>size nq * nnn </td></tr>
    <tr><td class="paramname">I</td><td>size nq * nnn </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the criterion, between 0 and 1. Larger is better. </dd></dl>

<p>Implemented in <a class="el" href="structfaiss_1_1IntersectionCriterion.html#a6f7aef25852931b22298f7bb4c358791">faiss::IntersectionCriterion</a>, and <a class="el" href="structfaiss_1_1OneRecallAtRCriterion.html#afe472c2ae38534c293b02feebf87988d">faiss::OneRecallAtRCriterion</a>.</p>

</div>
</div>
<a class="anchor" id="a174f0de8e6fd01905f5fa2170f5039d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::AutoTuneCriterion::set_groundtruth </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>gt_nnn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>gt_D_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const idx_t *&#160;</td>
          <td class="paramname"><em>gt_I_in</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Intitializes the gt_D and gt_I vectors. Must be called before evaluating</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gt_D_in</td><td>size nq * gt_nnn </td></tr>
    <tr><td class="paramname">gt_I_in</td><td>size nq * gt_nnn </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="AutoTune_8cpp_source.html#l00045">45</a> of file <a class="el" href="AutoTune_8cpp_source.html">AutoTune.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>/data/users/hoss/faiss/<a class="el" href="AutoTune_8h_source.html">AutoTune.h</a></li>
<li>/data/users/hoss/faiss/<a class="el" href="AutoTune_8cpp_source.html">AutoTune.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
